package com.samsung.actividades;

import com.samsung.R;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Menu extends Activity implements OnClickListener{
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		/*Log log=new Log();
		log.setLog("25", "Visita", "Visita realizada 2");*/
		setContentView(R.layout.menu);
		Resources res = getResources();
		Button menuConfig = (Button) findViewById(R.id.menuConfig);
		
		menuConfig.setBackgroundDrawable(res.getDrawable(R.drawable.menuconfig));
		menuConfig.setOnClickListener(this);
		
		Button menuIngresar = (Button) findViewById(R.id.menuIngresar);
		menuIngresar.setBackgroundDrawable(res.getDrawable(R.drawable.menuingresar));
		menuIngresar.setOnClickListener(this);
		
	}
	
	public void onClick(View target) {
		Intent intent;
		switch (target.getId()) {
		case R.id.menuConfig:			
			intent = new Intent("com.samsung.actividades.CONFIG");
	        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	        intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
	        startActivity(intent);
			break;
		case R.id.menuIngresar:			
			intent = new Intent("com.samsung.actividades.INICIO");
	        intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
	        intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
	        startActivity(intent);
			break;
		}
	}

}
